<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据验证-type接受多个类型</title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.js"></script>
</head>
<body>
<div id="case13-demo8">
    <foo-component v-bind:foo-message="fooMessage"></foo-component>
</div>
<script type="text/javascript">
    var case13Demo8=new Vue({
        el:"#case13-demo8",
        data:{
            fooMessage:'你好'
        },
        components:{
            'foo-component':{
                template:`<div>{{fooMessage}}</div>`,
                props:{
                    fooMessage: [Number,String]
                }
            }
        }
    })
</script>
</body>
</html>